<template>
    <div class="by-details">
        <section class="by-header">
            <p><b>任务名称：{{list.taskName}}</b></p>
            <div>开始时间：{{list.taskStarttime}}</div>
            <div>结束时间：{{list.taskEndtime}}</div>
            <div>保养类型：{{taskType[list.taskType]}}</div>
            <div>计划内容：{{list.taskContent}}</div>
            <div>备　　注：{{list.taskNote}}</div>
        </section>
        <section class="by-header">
            <p><b>保养点位：</b></p>
            <div v-for="item in list.playDetailSites" :key="item.value" @click="goDW(item.id,item.sysSite.siteId)">
                {{item.sysSite.siteId}}&nbsp;&nbsp;&nbsp;&nbsp;{{item.sysSite.siteName}}
                <i class="iconfont icon-jiantou-copy" style="color:#409eff;"></i>
            </div>
        </section>
    </div>
</template>

<script>
export default {
    data() {
        return {
            list: {},
            taskType:['水厂','二次泵站','供水管网','污水厂','污水泵站','排水管网']

        }
    },
    mounted() {
        this.getList()
    },
    methods: {
        //获取列表
        getList() {
            this.$api.baoyang.mtaskdetail({
                id: this.$route.query.id
            }).then(res => {
                if (res.success) {
                    this.list = res.data
                }
            })
        },
        goDW(id,siteId){
            this.$router.push({ path: 'dianwei', query: { taskId: this.$route.query.id,planDetailId:id,siteId:siteId } })
        }
    }
}
</script>

<style>
</style>
